The R script included here is designed to use data from the 2007 Adult Psychiatric Morbidity Survey, however the dataset itself is not included, but can be freely obtained online.

When run, the Rscript produces tables and figures from Congdon's paper, with the tables being output within the script, and figures output into a separate file, "figures.pdf."

Additionally, a further table is output in csv format, designed for use in the Bayesian SEM analysis which were attempted, but proved unsuccessful.